package org.dfl.core.model.transitions;

import java.util.ArrayList;
import java.util.Map;

import org.dfl.core.data.types.Type;
import org.dfl.core.data.types.TypeManager;
import org.dfl.core.model.TransitionExecutionException;

/**
 * transition that creates an empty multiset
 * @author Piotr Wlodarczyk
 *
 */
public class EmptyMultisetTransition extends FixedInputsTransition{
	@Override
	protected void initInputDefinitions() {
	}

	@SuppressWarnings("unchecked")
	@Override
	protected Object fire(Map<String, Object> inputMap)
			throws TransitionExecutionException {
		return new ArrayList();
	}

	@Override
	public String getDefaultDescription() {
		return "Creates an empty multiset object";
	}

	@Override
	protected Type getDefaultOutputDefinition() {
		return TypeManager.getCollectionType();
	}
}
